#===============================================================================
# @brief    cmake file
# Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved.
#===============================================================================
set(SOURCES_LIST
    ${CMAKE_CURRENT_SOURCE_DIR}/gui.c
    ${CMAKE_CURRENT_SOURCE_DIR}/ili9341_lcd.c
    ${CMAKE_CURRENT_SOURCE_DIR}/spi_ili9341_dispaly.c
    ${CMAKE_CURRENT_SOURCE_DIR}/test.c
    ${CMAKE_CURRENT_SOURCE_DIR}/lcd_font.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/main.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_apu.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_cpu.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_default.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_port.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_ppu.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_rom.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper0.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper1.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper117.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper180.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper2.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper3.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper7.c
    ${CMAKE_CURRENT_SOURCE_DIR}/nes/nes_mapper/nes_mapper94.c
)

# 设置头文件包含路径
set(HEADER_LIST
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}/nes
    ${CMAKE_CURRENT_SOURCE_DIR}/nes_mapper
)

# 设置编译器标志以抑制 sizeof 不完整数组类型的警告
set(COMPONENT_CCFLAGS
    -Wno-sizeof-array-argument
    -Wno-sizeof-pointer-memaccess
    -Wno-error
)

set(PUBLIC_HEADER "${PUBLIC_HEADER}" ${HEADER_LIST} PARENT_SCOPE)
set(SOURCES "${SOURCES}" ${SOURCES_LIST} PARENT_SCOPE)
set(COMPONENT_CCFLAGS "${COMPONENT_CCFLAGS}" ${COMPONENT_CCFLAGS} PARENT_SCOPE)